package gov.kqqzyyy.monkey.orderpad.network;

import java.io.File;
import java.util.List;
import java.util.Map;

import gov.kqqzyyy.monkey.orderpad.network.bean.BaseResponse;
import gov.kqqzyyy.monkey.orderpad.object.DC_KWBZ;
import gov.kqqzyyy.monkey.orderpad.object.DD_DDMX;
import gov.kqqzyyy.monkey.orderpad.object.FloorPatient;
import gov.kqqzyyy.monkey.orderpad.object.FloorsAndBeds;
import gov.kqqzyyy.monkey.orderpad.object.MRCPXX;
import gov.kqqzyyy.monkey.orderpad.object.Patient_JRHC;
import gov.kqqzyyy.monkey.orderpad.object.XTGL;
import gov.kqqzyyy.monkey.orderpad.object.post_param.CancelOrder_Param;
import gov.kqqzyyy.monkey.orderpad.object.post_param.StoredOrder;
import gov.kqqzyyy.monkey.orderpad.object.post_param.UserLoginParam;
import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Query;


public interface ApiInterface {

    //获取系统时间
    @GET("His/GetServerTime")
    Observable<BaseResponse<String>> getSystemTime();

    //获取菜品信息
    @GET("Book/GetCPXXAll")
    Observable<BaseResponse<List<MRCPXX>>> getMRCP();

    //获取口味备注
    @GET("Dish/QueryKwBZ")
    Observable<BaseResponse<List<DC_KWBZ>>> getKWBZ();

    //获取病人订单
    @GET("Book/GetPatientDCDDByZyh")
    Observable<BaseResponse<List<DD_DDMX>>> getPatientDCDD(@Query("zyh") String param);

    //取消订单
    @POST("Book/CancelOrder")
    Observable<BaseResponse<String>> cancelOrder(@Body CancelOrder_Param param);

    //获取楼层床位信息
    @GET("His/GetFloorsAndBeds")
    Observable<BaseResponse<List<FloorsAndBeds>>> getFloorsAndBeds(@Query("lcs") String lcs);

    //获取病人信息
    @GET("His/GetPatient")
    Observable<BaseResponse<List<FloorPatient>>> getFloorPatients(@Query("zyh") String param);

    //获取换床信息
    @GET("His/GetHcxxes")
    Observable<BaseResponse<List<Patient_JRHC>>> getHcxxes();

    //提交订单
    @POST("Book/SaveOrderDish")
    Observable<BaseResponse<String>> saveOrderDish(@Body List<StoredOrder> param);

    //用户登陆
    @POST("Account/DoLogin")
    Observable<BaseResponse<XTGL>> doLogin(@Body UserLoginParam param);

    @Multipart
    @POST("Uploader/Img_Book")
//    Observable<BaseResponse<String>> doUploadImg(@Part List<MultipartBody.Part> param);
        Observable<BaseResponse<String>> doUploadImg(@Part("description") RequestBody description,@Part List<MultipartBody.Part> param);
}
